<extend name="Public/base"/>

<block name="body">
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
	<div class="main-title"><h2>静态页设置</h2></div>
	<div class="tab-wrap">
		<div class="tab-content">
			<form action="{:U('save')}" method="post" class="form-horizontal">
				<div class="form-item">
					<label class="item-label">模块</label>
					<div class="controls">
						<select id="select" name="type" onchange="test();">
							<option value="0">首页</option>
							<option value="1">游戏中心</option>
							<option value="2">独家礼包</option>
							<option value="3">新闻中心</option>
							<option value="4">客服中心</option>
						</select>
					</div>
				</div>
				<div class="form-item">
					<label class="item-label">保存文件夹</label>
					<div class="controls">
						<input type="text" class="text input-small" name="dir" disabled value="/">
					</div>
				</div>
				<div class="form-item">
					<label class="item-label"></label>
					<div class="controls">
						<button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">生成</button>
						<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</block>

<block name="script">
<script type="text/javascript">
	function test() {
		var options=$("#select option:selected");
		var type = options.val();
		if(type==0){
			$("input[name='dir']").val("/");
		} else if(type==1){
			$("input[name='dir']").val("/html/games");
		} else if(type==2){
			$("input[name='dir']").val("/html/gifts");
		} else if(type==3){
			$("input[name='dir']").val("/html/news");
		} else if(type==4){
			$("input[name='dir']").val("/html/services");
		}
	}
</script>
</block>
